package aboa.club;

import java.util.ArrayList;

public class Club implements IClub {
	
	private String name;
	private ArrayList<IMember> members;
	private ArrayList<IEmployee> staff;
	
	public Club(String name) {
		this.name = name;
		members = new ArrayList<IMember>();
		staff = new ArrayList<IEmployee>();
	}


	public String getName() {
		return this.name;
	}


	@Override
	public ArrayList<IEmployee> getStaff() {
		return staff;
	}


	@Override
	public void addStaff(IEmployee person) {
		staff.add(person);
		
	}


	@Override
	public String getSalaries() {
		String listSalaries="";
		
		for(int x=0; x<staff.size();x++)
		{
			AbstractPerson employee =(AbstractPerson) staff.get(x);
			listSalaries+=employee.getName()+"\t"+staff.get(x).getSalary()+"\n";
		}
		
		return listSalaries;
	}


	@Override
	public ArrayList<IMember> getMembers() {
		return members;

	}


	@Override
	public void addMember(IMember member) {
		members.add(member);
	}


	@Override
	public String getMemberFees() {
		String listMembers="";
		for (int x=0; x<members.size();x++)
		{
			AbstractPerson member = (AbstractPerson) members.get(x);
			listMembers+=member.getName()+"\t"+members.get(x).getMonthlyFee()+"\n";
		}

		return listMembers;
	}
	
}